from random import randrange

VERBS = {
         'attack': ['bludgeon', 'hit', 'attack', 'stab', 'slash', 'bash', 'flog', 'beat', 'cut', 'hurt', 'injure', 'slice', 'weaken'],
         'kill': ['dies', 'crumbles', 'expires', 'is vanquished', 'is defeated', 'comes to an end'],
         'kill_sleep': ['murder', 'kill', 'abolish', 'do in', 'slaughter', 'exterminate', 'destroy']
         }
ENDINGS = {
           'attack':['s', 's', 's', 's', 'es', 'es', 's', 's', 's', 's', 's', 's', 's']
           }

SENTENCES = {
             'already_equipped': 'You may only equip %d %s',
             'battle': 'You %s the %s; the %s %s you',
             'death': 'You are dead',
             'drop': 'You drop the %s',
             'equip': 'You equip the %s',
             'examine': 'You see %s %s',
             'full_inventory': 'Your inventory is full',
             'item': '%s: %s',
             'kill': 'The %s %s',
             'kill_sleep': 'You %s the %s in its sleep',
             'miss': 'You miss the %s',
             'more_xp': 'You need more experience to equip the %s',
             'not_equippable': 'You cannot equip the %s', #Equippable - is that even a word?
             'pick_up': 'You pick up %s',
             'pick_up_nothing': 'There is nothing to pick up',
             'unequip': 'You unquip the %s',
             }

def get_verb(action, ending = False):
    id = randrange(len(VERBS[action]))
    if ending:
        return VERBS[action][id] + ENDINGS[action][id]
    else:
        return VERBS[action][id]

def get_dialog(action, *params):
    return SENTENCES[action] % params

if __name__ == "__main__":
    print "Please run main.py!"
